from fastapi import HTTPException
import logging


class JsonException(HTTPException):
    detail:str
    status_code:int
    def __init__(self, detail: str="发生错误", status_code: int=400):
        self.detail = detail
        self.status_code = status_code
        logging.warning(detail)
